import Vue from 'vue'
import App from './App'
import store from './store'  
Vue.prototype.$store = store  
Vue.config.productionTip = false

Vue.prototype.checkLogin = function(backPage,backType = 1){
	// backPage 登录后返回页面
	// backType 返回跳转类型
	let loginToken = uni.getStorageSync('logintoken')
	if(loginToken == ''){
		// uni.redirectTo({
		// 	url:'../login/login'
		// })
		uni.redirectTo({
			url:`/pages/login/login?backPage=${backPage}&backType=${backType}`
		})
		return fale
	}
	return loginToken
}

App.mpType = 'app'


const app = new Vue({
	store,
    ...App
})
app.$mount()
